﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="注册验证控件.aspx.cs" Inherits="作业.注册验证控件" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>注册验证控件</title>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <script src="js/bootstrap.min.js"></script>
    <style>
        #body {
               text-align:center;
               padding-top:100px
        }
        #background {
               border-style: solid;
               border-width: 1px;
               text-align:center;
               border-color:inherit;
               width:500px;
               margin:auto;
               border-radius:20px;
               box-shadow:0px 0px 20px lightgray;
               height: 500px;
        }
        .title {
            display:inline-block;
            width:70px;
            text-align:justify;
            text-align-last:justify;
            margin-right:10px;
        
        }

    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div id="body" class="form-inline">
            <div id="background">
                <asp:Panel ID="Panel1" runat="server">
                    <h2>用户注册</h2>
                    <p>
                        <aiv class="title">用户名：</aiv><asp:TextBox placeholder="请输入用户名" class="form-control" ID="TxtUserName" runat="server" style="margin-right:10px;"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="TxtUserName" ID="UserNameValidator" runat="server" ForeColor="Red" ErrorMessage="请输入用户名"></asp:RequiredFieldValidator>
                    </p>
                    <p>
                        <aiv class="title">密码：</aiv><asp:TextBox placeholder="请输入密码" class="form-control" ID="TxtPwd" runat="server" style="margin-right:25px;"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="TxtPwd" ID="TxtPwdValidator" runat="server" ForeColor="Red" ErrorMessage="请输入密码"></asp:RequiredFieldValidator>

                    </p>
                    <p>
                        <aiv class="title">姓名：</aiv><asp:TextBox placeholder="请输入姓名" class="form-control" ID="TxtName" runat="server" style="margin-right:25px;"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="TxtName" ID="NamePwdValidator" runat="server" ForeColor="Red" ErrorMessage="请输入姓名"></asp:RequiredFieldValidator>

                    </p>
                    <p>
                        <aiv style="
                                display:inline-block;
                                width:70px;
                                text-align:justify;
                                text-align-last:justify;
                            ">性别：</aiv>
                        
                        <asp:DropDownList  class="form-control" ID="DrDoGender" runat="server" style="margin-right:215px;">
                            <asp:ListItem Value="男">男</asp:ListItem>
                            <asp:ListItem Value="女">女</asp:ListItem>
                            <asp:ListItem Value="保密">保密</asp:ListItem>
                            <asp:ListItem></asp:ListItem>
                        </asp:DropDownList>

                    </p>
                    <p>
                        <aiv class="title" style="
                                display:inline-block;
                                width:70px;
                                text-align:justify;
                                text-align-last:justify;
                            ">出生日期：</aiv>
                        <input style="margin-right:140px;" id="inputDate" class="form-control" type="date" value=""/>
                        <script>
                            document.getElementById('inputDate').valueAsDate = new Date();
                        </script>

                    </p>
                    <p>
                        <aiv class="title">电话：</aiv><asp:TextBox placeholder="请输入电话" class="form-control" ID="TxtPhone" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="TxtPhone" ID="PhoneValidator" runat="server" ForeColor="Red" ErrorMessage="请输入电话号码"></asp:RequiredFieldValidator>

                    </p>
                    <p>
                        <aiv class="title">邮箱：</aiv><asp:TextBox placeholder="请输入邮箱" class="form-control" ID="TxtEmail" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="TxtEmail" ID="EmailValidator1" runat="server" ForeColor="Red" ErrorMessage="请输入邮箱地址"></asp:RequiredFieldValidator>

                    </p>
                    <p>
                        <aiv class="title">兴趣爱好：</aiv><asp:TextBox placeholder="请输入兴趣爱好" class="form-control" ID="TextLike" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="TextLike" ID="LikeValidator1" runat="server" ForeColor="Red" ErrorMessage="请输入兴趣爱好"></asp:RequiredFieldValidator>

                    </p>
                        <asp:Button type="button" class="btn btn-success" ID="BtnSub" runat="server" Text="注册" OnClick="BtnSub_Click"  />

                </asp:Panel>
            </div>
        </div>
    </form>
</body>
</html>
